﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrainingWorkshop.DAL_EF;

namespace DAL_EF
{
    /// <summary>
    /// Author: Sissi Zeng
    /// Date:2012-08-12 19:50
    /// This class is used to handle data from table Teacher in database
    /// </summary>
    public static class TeacherRepository
    {
        /// <summary>
        /// get all teachers from table Teacher in database
        /// </summary>
        /// <returns>list of teacher</returns>
        public static List<Teacher> GetAllTeacher()
        {

            using (var db = new projectbEntities())
            {
                List<Teacher> teachers = db.Teacher_SelectAll().ToList<Teacher>();
                return teachers;
            }
        }
    }
}
